{layout name="common@common_layout/template" /}
<style type="text/css">
    table tr th,
    table tr td {
        text-align: center;
    }
</style>
<section class="panel panel-default">
    <header class="panel-heading">
        <h3 class="m-b-none">咨询者列表</h3>
        <!--<form action="crm_record" method="post">-->
        <!--<input type="submit" value="OK" />-->
        <!--</form>-->
    </header>
    <div class="row wrapper my_conditions">
        <form action="{:url('consultant_module/index/show_list')}" method="get">
            <span>姓名:</span><input type="text" name="name" placeholder="查询的姓名" value="{$name}"/>
            <span>电话号码:</span><input type="text" name="phone" placeholder="查询的电话号码" value="{$phone}"/>
            <span>联系状态:</span>
            <select name="contact_state">
                <option value="999" {$contact_state==999?
                "selected": ""}>全部</option>
                <option value="1" {$contact_state==1?
                "selected": ""}>已联系</option>
                <option value="0" {$contact_state==2?
                "selected": ""}>未联系</option>
            </select>
            <span>上门情况:</span>
            <select name="visit_state">
                <option value="999" {$visit_state==999?
                "selected": ""}>全部</option>
                <option value="1" {$visit_state==1?
                "selected": ""}>已上门</option>
                <option value="0" {$visit_state==2?
                "selected": ""}>未上门</option>
            </select>
            <span>意向情况:</span>
            <select name="intention_id">
                <option value="999">全部</option>
                {volist name="intention_list" id="intention" empty="暂时没有数据"}
                <option value="{$intention.id}" {$intention.id==$intention_id?
                "selected": ""}>{$intention.type}</option>
                {/volist}
            </select>
            <span>日期:</span><input class="Wdate" type="text" onClick="WdatePicker()" placeholder="请选择日期"
                                   name="search_date" value="{$date}">
            <input type="submit" value="查询"/>
            <buttom class="btn btn-default btn-sm btn-warning"
                    style="height: 20px;line-height: 20px;font-size: 12px;padding: 0 8px;"
                    onclick="location.href='/consultant_module/index/show_list'">重置
            </buttom>
        </form>
    </div>
    <div class="table-responsive">
        <table class="table table-striped b-t b-light consultant_list">
            <thead>
            <tr>
                <th>咨询日期</th>
                <th style="width:100px">姓名</th>
                <th>电话</th>
                <th>上门情况</th>
                <th>意向程度</th>
                <th>联系状态</th>
                <th>咨询师</th>
                <th style="width: 195px;">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="list" id="vo" empty="暂时没有数据"}
            <tr data-id={$vo.id} data-name={$vo.name}>
                <td>{:date('Y-m-d', $vo.first_contact_date)}</td>
                <td>{:highlight($vo.name,$name)}</td>
                <td>{$vo.phone}</td>
                <td>{$vo.visit_state==1?"已上门":"未上门"}</td>
                <td>{$vo.type}</td>
                <td>{$vo.contact_state==1?"已联系":"未联系"}</td>
                <td>{$vo.s_name}</td>
                <td style="position: relative;">
                    <a class="btn btn-sm btn-primary btn-rounded my_btn record_open">添加记录</a>
                    <button class="btn btn-sm btn-default btn-rounded my_btn consultant_more">更多操作</button>
                    <div class="common_btn consultant_btn">
                        <ul>
                            <li>
                                <button class="btn btn-sm btn-info btn-rounded my_btn consultant_show">详细信息</button>
                            </li>
                            <li>
                                <a class="btn btn-sm btn-dark btn-rounded my_btn message_open">添加提醒</a>
                            </li>
                            <li>
                                <a class="btn btn-sm btn-success btn-rounded my_btn add_student">设为学生</a>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
    <footer class="panel-footer">
        <div class="row">
            <div class="col-sm-offset-4 col-sm-8 text-right text-center-xs">
                {$list->render()}
            </div>
        </div>
    </footer>
</section>


<!--公共弹出层-->
<div id="common_popup" class="popup">
    <div class="popup_web">
        <div class="popup_rich_text">
            <div class="btn-toolbar m-b-sm btn-editor" data-role="editor-toolbar" data-target="#editor">
                <div class="btn-group">
                    <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" title="Font"><i
                            class="fa fa-font"></i><b class="caret"></b></a>
                    <ul class="dropdown-menu">
                    </ul>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" title="Font Size"><i
                            class="fa fa-text-height"></i>&nbsp;<b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a data-edit="fontSize 5"><font size="5">Huge</font></a></li>
                        <li><a data-edit="fontSize 3"><font size="3">Normal</font></a></li>
                        <li><a data-edit="fontSize 1"><font size="1">Small</font></a></li>
                    </ul>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default btn-sm" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i
                            class="fa fa-bold"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i
                            class="fa fa-italic"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="strikethrough" title="Strikethrough"><i
                            class="fa fa-strikethrough"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i
                            class="fa fa-underline"></i></a>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default btn-sm" data-edit="insertunorderedlist" title="Bullet list"><i
                            class="fa fa-list-ul"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="insertorderedlist" title="Number list"><i
                            class="fa fa-list-ol"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="outdent" title="Reduce indent (Shift+Tab)"><i
                            class="fa fa-dedent"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="indent" title="Indent (Tab)"><i
                            class="fa fa-indent"></i></a>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default btn-sm btn-info" data-edit="justifyleft"
                       title="Align Left (Ctrl/Cmd+L)"><i
                            class="fa fa-align-left"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"><i
                            class="fa fa-align-center"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"><i
                            class="fa fa-align-right"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"><i
                            class="fa fa-align-justify"></i></a>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i
                            class="fa fa-link"></i></a>
                    <div class="dropdown-menu">
                        <div class="input-group m-l-xs m-r-xs">
                            <input class="form-control input-sm" placeholder="URL" type="text"
                                   data-edit="createLink"/>
                            <div class="input-group-btn">
                                <button class="btn btn-default btn-sm" type="button">Add</button>
                            </div>
                        </div>
                    </div>
                    <a class="btn btn-default btn-sm" data-edit="unlink" title="Remove Hyperlink"><i
                            class="fa fa-cut"></i></a>
                </div>

                <div class="btn-group hide">
                    <a class="btn btn-default btn-sm" title="Insert picture (or just drag & drop)"
                       id="pictureBtn"><i class="fa fa-picture-o"></i></a>
                    <input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage"/>
                </div>
                <div class="btn-group">
                    <a class="btn btn-default btn-sm" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i
                            class="fa fa-undo"></i></a>
                    <a class="btn btn-default btn-sm" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i
                            class="fa fa-repeat"></i></a>
                </div>
            </div>
            <div id="editor" class="form-control rich_text">
            </div>
        </div>
    </div>
</div>
<script src="/static/js/consultant/consultant.js" type="text/javascript" charset="utf-8"></script>